package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.BrowsingMapper;
import com.education.wisdom.pojo.Browsing;
import com.education.wisdom.service.IBrowsingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 浏览记录 服务层实现
 * 
 * @author ruoyi
 * @date 2018-10-26
 */
@Service
public class BrowsingServiceImpl implements IBrowsingService
{
	@Autowired
	private BrowsingMapper browsingMapper;

	/**
     * 查询浏览记录信息
     * 
     * @param bNumber 浏览记录ID
     * @return 浏览记录信息
     */
    @Override
	public Browsing selectBrowsingById(String bNumber)
	{
	    return browsingMapper.selectBrowsingById(bNumber);
	}
	
	/**
     * 查询浏览记录列表
     * 
     * @param browsing 浏览记录信息
     * @return 浏览记录集合
     */
	@Override
	public List<Browsing> selectBrowsingList(Browsing browsing)
	{
	    return browsingMapper.selectBrowsingList(browsing);
	}
	
    /**
     * 新增浏览记录
     * 
     * @param browsing 浏览记录信息
     * @return 结果
     */
	@Override
	public int insertBrowsing(Browsing browsing)
	{
	    return browsingMapper.insertBrowsing(browsing);
	}
	
	/**
     * 修改浏览记录
     * 
     * @param browsing 浏览记录信息
     * @return 结果
     */
	@Override
	public int updateBrowsing(Browsing browsing)
	{
	    return browsingMapper.updateBrowsing(browsing);
	}

	/**
     * 删除浏览记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteBrowsingByIds(String ids)
	{
		return browsingMapper.deleteBrowsingByIds(Convert.toStrArray(ids));
	}
	
}
